package com.imc.platform.base.schedule.task;

import com.imc.platform.base.schedule.service.ResumeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by tanweiping on 2018/12/3.
 */
@Slf4j
@Component
public class LessonStock {

    @Autowired
    ResumeService resumeService;

    @Scheduled(cron="0 0/15 * * * ?")
    public void resumeStockFromOrder(){
        log.info("回收库存开始");
        resumeService.resumeStockFromOrder();
        log.info("回收库存结束");
    }
}
